Max-mixed EWMA control chart for joint monitoring of mean and variance: an application to yogurt packing process

The Max-Mixed EWMA Exponentially Weighted Moving Average (MM EWMA) control chart is a statistical process control technique used for joint monitoring of the mean and variance of a process. This control chart is designed to detect small and moderate shifts in the mean and variance of a process by comparing the maximum of two statistics, one based on the mean and the other on the variance. In this paper, we propose a new MM EWMA control chart. The proposed chart is compared with existing control charts using simulation studies, and the results show that the chart performs better in detecting small and moderate shifts in both the mean and variance. The proposed chart can be helpful in quality control applications, where joint monitoring of mean and variance is necessary to ensure a product’s or process’s quality. The real-life application of the proposed control chart on yogurt packing in a cup data set shows the outperformance of the MM EWMA control chart. Both simulations & real-life application results demonstrate the better performance of the proposed chart in detecting smaller shifts during the production process.

and variance in a yogurt packaging process can be justified by the aim to promote process comprehension, boost quality control, and facilitate prompt corrective measures to uphold ideal production circumstances.
The remaining article is organized as follows: we explain the existing Max EWMA control chart in section "Max-EWMA control chart for joint monitoring", and we describe the suggested MM EEWMA control chart for concurrent monitoring in section "Proposed MM EWMA Control Chart for Joint Monitoring".In section "Simulation Study", a simulation study is described to assess the performance of the suggested chart.Section "Illustration example" presents a real-world example of how the suggested chart might be used in practice.Section "Main findings" presents the key findings, and in section "Conclusion", the conclusion is provided.

Max-EWMA control chart for joint monitoring
The current Shewhart control chart effectively utilizes all the relevant information in the current sample.The EWMA control chart was designed to assign the highest weights to the most recent subgroup, while gradually decreasing the weights for previous observations geometrically.The EWMA statistics are exclusively utilized to analyze shifts in the mean of the process production.Roberts 27 introduced novel exponentially weighted moving average (EWMA) statistics for the ith sample, which has a size of 5, specifically designed for monitoring a single parameter.
Xie 28 and Chen et al 29 .introduced the concept of integrating the monitoring of both the mean shift and variance shift of parameters into a single control chart, referred to as the Maximum Exponentially Weighted Moving Average (Max-EWMA) control chart.Let X be a normally distributed random variable in process production.It has a mean of µ = µ 0 + aσ 0 and a variance σ 2 = b 2 σ 2 0 here µ 0 and σ 2 0 are known values for the mean and variance, respectively.The variables b and a represent shifts in variance and mean, respectively.In an in-control method, b has a value of 1 and a has a value of 0. The Max-EWMA statistics have a higher efficiency in detecting minor shifts.The converted statistics for in-control procedures with a zero mean and unit variance for the ith sample follow a normal distribution.
where i = 1,2,3,…,n is the size of ith sample, the mean X i = n i=1 X ij n of ith sample, and variance.
n−1 of ith sample, ∅ −1 is the inverse function of standard normal distribution, while H(ξ , v) follow χ 2 distribution with v degree of freedom.
The two Exponentially Weighted Moving Average (EWMA) statistics can be determined by utilizing Eqs.(2) and (3).
where M 0 = N 0 = 0 for the first sample and is a smoothing constant, such that 0 < ≤ 1.
In the above statistics, the sum of all weights is equal to one.The quantities M i−1 and N i−1 represent the values of the variable in the previous iteration.We will utilize a single maximum absolute statistic to collectively assess both the mean and variance, rather than analyzing each statistic independently.
The average and the dispersion of the K i statistic Xie 28 are provided, correspondingly, Using Xie 25 method, it is sufficient to have only one upper control limit (UCL) when plotting Max-EEWMA statistics to control manufacturing methods.
The control constant, written as L, is computed to achieve the desired average run length (ARL 0 ) for an incontrol process and the variance is

Proposed MM EWMA control chart for joint monitoring
In this section, the proposed MM EWMA control chart is explained.The quality characteristics U i and V i are supposed to follow a normal distribution.We suggested the Max Mixed EWMA control chart.Note that a critique paper is presented by Haq and Woodal 30 on the modified EWMA versions and they specifically discussed (1) the Extended EWMA version of Naveed et al 31 .Aslam et al 32 .presented a rebuttal paper on the use of such modified EWMA statistic.The reader may consult these papers for further clarity.The simple moving averagesbased EWMA control chart has an issue in assigning the weights as the statistic assigns more weight to the past observations 33 .This problem occurs as all the observations are assigned equal weights to calculate moving averages.To address this issue, we have implemented a weighted moving averages approach.In this method, 80% of the weight is allocated to the current observation, while the remaining 20% is distributed equally among the previous observations for the EWMA statistic.For a visual representation of the weight distribution to current and past values, reader is referred to Supplementary Figure A and Supplementary Figure B in the Appendix.The design of the proposed control chart is given below: Step 1: Select a sample of n size for calculating the weighted moving averages of U i and V i and compute two suggested MM EWMA statistics.
The two suggested MM EWMA statistics for mean, and variance are where R 0 = S 0 = 0 for the first sample and the smoothing parameter lies between 0 &1 with k = − 2 .
The total weight in the suggested statistics is one.The quantities U i−1 and V i−1 denote the preceding value of the variable, and the R i−1 and S i−1 denote the prior value of the statistic.
The MM EWMA statistics mean and variation for in-control are Instead of examining mean and variance individually, we will combine them into a single maximum absolute statistic.The variance proposed chart at the time t is calculated from the moving average at each width (w).
Step 2: Select the Max statistic from the two suggested MMEWMA statistics.
where i = 1,2, 3, … The maximum statistic available from two absolute statistics for mean and variance is called the MM EWMA statistic.According to 34 , using absolute quantities only the upper control limit (UCL) is sufficient for plotting MM EWMA statistics for monitoring the manufacturing process.
Step 3: The process will be considered in control when the suggested EEWMA statistic exceeds the limit; otherwise, it will be considered out of control.The upper control limit is denoted by "UCL." The control constant is denoted by L and computed to attain ARL 0 required average run length for in control process.

Simulation study
This part evaluates the in-depth analysis of the suggested control chart.The data is generated for this purpose using a normal distribution such that Y i ∼ N(0, 1) .The following steps should be followed to calculate ARL and SDRL for MM EWMA: Step 1: Sample variance and mean control statistics.
i. Compute 30,000 n-size random samples for the in-control process using the normal distribution.ii.Determine the suggested statistic for each sample.
Step 2: Setting up Control Limits.i. Decide the initial values of two parameters L and .ii. Compute a statistic that accounts for both variance and mean and is given in (8) and (9).iii.To obtain MM EWMA statistics, determine the statistic for both mean and variance given in (13).www.nature.com/scientificreports/iv.Following the design of the control chart, examine the proposed statistic in the presence of an out-ofcontrol signal.When the process is considered in-control, go on to step v.If not, note the number of samples as the run length for in-control.v.To evaluate ARL 0 , repeat steps ii through iv 30,000 times.If we reach the required ARL 0 , go to Step 3 with the current value of L .If not, modify the value of L and repeat steps ii through v in Step 2.
Step 3: Calculation of out-of-control ARL.
i. Produce a random variable Y from a normal distribution with a mean shift for each sample, denoted as Y ∼ N(a, 1 * b) , where in control mean and variance are considered as zero and one respectively.Here, a is the shift in mean and b is the shift in variance.ii.Analyze the sample with the proposed statistic.iii.The process will continue to cycle through steps i and ii from step 3 until the process is no longer in control.
A run length will be recorded based on the total number of samples taken.iv.To determine an accurate number for ARL and SDRL, we shall repeat this process 30,000 times.We followed the design of the control chart described in section "Proposed MM EWMA Control Chart for Joint Monitoring" to obtain the out-of-control run lengths.v.If MM EWMA stays within the UCL's region, the process will be in-control.After that, make another sample and go back through the first four steps again.vi.If the MM EWMA statistic falls outside the UCL limit, the procedure is now considered to be out-ofcontrol, production ends, and the target run length is reached.But in the case of steady state ARL cut point is also considered.
The 30,000 replicates were used to compute each ARL, SDRL, and MRL (median run length).In this study, a=0.0,0.05,0.1, 0.25, 0.50, 0.75, 1, 1.5, 2.0, and b=0.25, 0.50, 0.75, 0.90, 1.00, 1.10, 1.25, 1.50, 2.00, 2.50, 3.00 were utilized in various combinations for mean shift and variance shift, respectively.Tables 1, 2 show that the MM EWMA chart is effective at simultaneously detecting the shifts in mean and variance.Supplementary Table 2 shows the steady-state ARLs of the proposed control chart.The ability to identify both changes at an early stage is demonstrated by the ease with which ARLs degrade as mean shift increases and, similarly, with increases in variance shift.

Illustration example
The proposed chart's implementation is evaluated using the data set given by 35 and 36 .The 200 values from the yogurt packing process in a cup with 125 g of the quality characteristic "X" are included in the data.Following the long-term phase-I research, the in-control parameters' mean, and standard deviation were calculated to be µ o = 124.9and σ o = 0.76, respectively.Every hour, the quality control experts select a sample and record its weight twice to maintain the consistency of the cup filling.The 20 samples of size 5 that were generated in the aforementioned papers are still used in this article, but we consider the first 100 data values to be in control and the remaining 100 values to be shifted.We specify the design parameters employed in constructing the control chart when the ARL 0 = 370.We consider the selection of the smoothing constant as λ = 0.3, which determines the degree of smoothing applied to the data.Additionally, the parameter w = 3 is taken that signifies the width of the moving average window used for smoothing.Note that the value of smoothing constant is 0.3 for the Max-EWMA control chart taking ARL 0 = 370.Then, we randomly select 20 samples, 10 from within the control range and the remaining 10 from the shifted range, for each of the five sizes of yogurt cups.We then used these 20 values to derive the proposed MM EWMA statistic and UCL.Table 3 provides sample statistics and upper control limits.
Figure 1 presents a visually consistent representation of the data from Table 3, which illustrates the MM EWMA control chart suggested in this study.The suggested chart is denoted as UCL in the provided chart, whereas the existing chart is represented as UCL1 in Fig. 2, depicted as a horizontal line.The proposed chart clearly demonstrates an out-of-control signal at the 13th value, whereas the existing chart reveals this signal at the 14th sample.Hence, it is evident from the analysis of Figs. 1, 2 that the chart provided in this study exhibited superior performance compared to the previous chart.

Main findings
MM EWMA control chart results are depicted in Tables 1, 2, The ARLs and SDRLs for = 0.2 are presented in Table 1 for different values of w and Table 2 for = 0.3.The results of MM EWMA statistics are presented in Table 3 with Max-EWMA statistics.The main results of the proposed chart are mentioned below.
The process is without shift when a = 0 and b = 1, and it signifies that the procedure is in control with 370 ARL 0 .It can be observed from all three tables that when mean shifts "a" increases from 0.00 to 0.10, 0.25, 0.50, 0.75, 1.00, 1.50, and 2.00, the respective values of ARLs and SDRLs decrease.It demonstrates that the suggested chart is more effective in detecting mean shifts early.The variance shift "b" exhibits the same pattern as "a" The values of ARLs & SDRLs are decreased in accordance with variations in mean shift "a" as the variance shift changes from 1 to 0.25, 0.50, 0.75, 0.90, and from 1 to 1.10, 1.25, 1.50, 2.00, 2.50, and 3.00.Additionally, variance shift is also quickly detected, which further illustrates the effectiveness of the proposed chart.The efficiency of our proposed Max-Mixed EWMA control chart for the combined detection of mean and variance shifts is revealed by the last column in all Tables 1, 2, which compares it to the present Max-EWMA control chart in terms of ARLs.As values of w increase from 2 to 3 for different values of = 0.2, and 0.  2 shows the steady-state ARLs.The pattern of steady-state ARLs is the same as expected.The real life application is capable of detecting out-of-control single earlier than the existing chart.This finding is also supported by the results of simulations, as evident from the observations made in Figs. 1 and 2. Specifically, the proposed chart identify out of control at the 13th value, whereas the existing chart detects them at the 14th value.
From the above results and data from calculations in the ARL values tables, we can infer that our developed MM EWMA control chart works better than existing control charts.Even smaller mean and variance shifts are effectively detected by the suggested chart simultaneously.Instead of using two separate statistics for mean and variance, the proposed control chart allows for simultaneously investigating both mean and variance process shifts with one statistic.

Conclusion
Several types of control charts have been developed by different researchers in the quality control field, but many researchers ignored the joint monitoring of mean and variance simultaneously.In this article, we addressed the issue of joint monitoring and developed a new control chart named the MM EWMA control chart.The values of ARLs and SDRLs have been calculated, and tables were created for multiple smoothing constant values with different mean and variance shifts.The efficacy of our proposed MM EWMA control chart for simultaneously detecting shifts in both mean and variance is demonstrated by the final column in all tables.It compares the performance of the proposed chart to that of the current Max-EWMA control chart.Comparisons to the existing Max-EWMA control chart were made regarding ARLs and SDRLs, revealing that the proposed chart identifies mean and variance shifts quicker than the Max-EWMA chart.The real-life application of the MM EWMA control chart was also illustrated, and it also shows the efficiency of the developed chart.The real-life application shows the individual instances that are out-of-control earlier than the current application.The developed control chart can be used in manufacturing for joint monitoring of shifts in the mean and variance during production.

Table 3 .
MM EWMA statistics and Max-EWMA statistics for the yogurt filling data set.